// 字符串相加
/**
 * @param {string} num1
 * @param {string} num2
 * @return {string}
 */
 var addStrings = function(num1, num2) {
    let i=num1.length-1;
    let j=num2.length-1;
    let carry=0;
    let res=[];
    while(i>=0||j>=0||carry!=0){
        let c1=i>=0?num1.charAt(i)-'0':0;
        let c2=j>=0?num2.charAt(j)-'0':0;
        let ans=c1+c2+carry;
        res.push(ans%10);
    carry=Math.floor(ans/10);
    i--;
    j--;
    }
    return res.reverse().join('');
    };